//
//  StartPageVC.m
//  MovieDate
//
//  Created by yyta on 16/4/15.
//  Copyright © 2016年 MovieDate. All rights reserved.
//

#import "StartPageVC.h"

@interface StartPageVC ()

@property (strong, nonatomic) IBOutlet UIScrollView *pScrollView;

@end

@implementation StartPageVC

- (void)viewDidLoad {
    [super viewDidLoad];
    [self initView];
    // Do any additional setup after loading the view.
}

- (void)initView
{
    for (int i = 0; i < 4; i ++)
    {
        @autoreleasepool {
            UIImageView *img = [[UIImageView alloc] initWithFrame:CGRectMake(0 + i * [UIScreen mainScreen].bounds.size.width, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)];
            switch (i)
            {
                case 0:
                    img.image = [UIImage imageNamed:@"about_1"];
                    break;
                    
                case 1:
                    img.image = [UIImage imageNamed:@"about_2"];
                    break;
                    
                case 2:
                    img.image = [UIImage imageNamed:@"about_3"];
                    break;
                    
                case 3:
                    img.image = [UIImage imageNamed:@"about_4"];
                    break;
            }
            
            [_pScrollView addSubview:img];
        }
    }
    
    [_pScrollView setContentSize:CGSizeMake(4 * [UIScreen mainScreen].bounds.size.width, 0)];
    
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
